local skel = fk.CreateSkill {
  name = "efengqi__jiang",
}

Fk:loadTranslationTable{
  ["efengqi__jiang"] = "激昂",
  [":efengqi__jiang"] = "一名角色使用【决斗】或红色【杀】时，你可以摸一张牌，若其不为你，你成为目标。",

  ["#efengqi__jiang-draw"] = "激昂：你可以摸一张牌",
  ["#efengqi__jiang-add"] = "激昂：你可以摸一张牌，并成为%dest使用%arg的目标",

  ["$efengqi__jiang1"] = "吾乃江东小霸王孙伯符！",
  ["$efengqi__jiang2"] = "江东子弟，何惧于天下！",
}

skel:addEffect(fk.CardUsing, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(skel.name) and
      ((data.card.trueName == "slash" and data.card.color == Card.Red) or data.card.trueName == "duel")
  end,
  on_cost = function (self, event, target, player, data)
    local prompt = "#efengqi__jiang-draw"
    local add = false
    if target ~= player and not table.contains(data.tos, player)
      and not target:isProhibited(player, data.card) then
      add = true
      prompt = "#efengqi__jiang-add::"..target.id..":"..data.card:toLogString()
    end
    if player.room:askToSkillInvoke(player, { skill_name = skel.name, prompt = prompt}) then
      event:setCostData(self, {add = add})
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(1, skel.name)
    if event:getCostData(self).add then
      data:addTarget(player)
    end
  end,
})

return skel
